
package com.seekting.study;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TimeFormater {

    public static void main(String[] args) {

        String time = "20140514 00:00:00";
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd HH:mm:ss");
        Date date;
        try {
            date = simpleDateFormat.parse(time);
            long timeM = date.getTime();
            long current = System.currentTimeMillis();

            System.out.println(timeM);
            System.out.println(current);

//            System.out.println(date.toLocaleString());
        } catch (ParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

    }
}
